package semantic.tables;

import java.util.HashMap;
import java.util.Map;

public class ProgramTable {

	private final Map<Symbol, ClassTable> classes = new HashMap<Symbol, ClassTable>();

	public boolean addClass(String key, ClassTable value) {
		if (classes.containsKey(Symbol.symbol(key))) {
			return false;
		}
		classes.put(Symbol.symbol(key), value);
		return true;
	}

	public ClassTable getClass(String key) {
		return classes.get(Symbol.symbol(key));
	}
}
